<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>下载分析</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/echarts.min.js"></script>
    <script type="text/javascript" src="js/jquery.js"></script>
</head>

<body>
<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">首页</a></li>
        <li><a href="#">下载分析</a></li>
    </ul>
</div>

<div class="formbody">
<div id="main" style="width: 1000px;height: 500px;"></div>


</div>
</body>
</html>
<script>
    var myChart=echarts.init(document.getElementById("main"));
    $.get("chart",function (data){
        var btArr=data.bts;
        var numArr=data.nums;

        var option = {
            xAxis: {
                type: 'category',
                data: btArr
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    data: numArr,
                    type: 'line'
                }
            ]
        };

        myChart.setOption(option);
    })

</script>